i=2000
while i<=3200:
    i+=1
    if i%7==0 and i%5!=0:
        print(i)
    else:
        continue

